package homework.ooday03._cp.animal;

public class Test {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[1];
        dogs[0] = new Dog("小黑",1,"黑");
        for(int i=0;i<dogs.length;i++){
            dogs[i].swim();
        }

        Fish[] fish = new Fish[1];
        fish[0] = new Fish("小金",1,"金");
        for(int i=0;i<fish.length;i++){
            System.out.println(fish[i].color);
        }

        Chick[] chicks = new Chick[2];
        chicks[0] = new Chick("小鸡1号",1,"白");
        chicks[1] = new Chick("小鸡2号",2,"红");
        for(int i=0;i<chicks.length;i++){
            System.out.println(chicks[i].name);
            chicks[i].eat();
        }

    }
}
